<?php
if (!defined('BASEPATH'))
	exit('No direct script access allowed');
$this->load->view('header');
?>
<section class="container_12 clearfix" id="main">
	<section id="slideshow">
		<div class="grid_5">
			<div>
				<h1>Welcome to ouyoyo</h1>
				<p>欢迎来到 ouyoyo,此程序由 <a href="http://codeigniter.com">Codeigniter</a>
					驱动的开源博客程序。在<a href="http://www.opensource.org/licenses/bsd-license.php" title="BSD开源协议"> BSD开源协议 </a>下发布。
					前端采用 <a href="http://960.gs"> 960 Grid System </a>布局，
					HTML5编码。
					拥有文章发布，微博同步，评论，相册等功能。
				</p>
				<p class="download"><a href="http://code.google.com/p/ouyoyo-blog/" title="download">Download</a></p>
			</div>
		</div>
		<div class="grid_7"></div>
	</section>
	
    <section class="grid_9" id="container">
        <ol class="post_list">
			<?php foreach ($posts as $v): ?>
				<li>
					<article>
						<time datetime="<?php echo date($v->post_date); ?>" pubdate="pubdate">
							<span class="month"><?php echo date('M', strtotime($v->post_date)); ?></span>
							<span class="day"><?php echo date('d', strtotime($v->post_date)); ?></span>
						</time>
						<div class="prefix_1">
							<header>
								<h1> <?php echo anchor("/articles/$v->ID", "$v->post_title", array('title' => "$v->post_title")); ?> </h1>
							</header>
							<div>
								<?php echo $this->Posts_model->get_post_description($v->post_content_html, 0, 200, 'utf8'); ?>
							</div>
							<footer>
								<?php echo anchor("/articles/$v->ID", "+ Read More", array('title' => "$v->post_title")); ?>
							</footer>
						</div>
					</article>
				</li>
			<?php endforeach; ?>
        </ol>

    </section>
    <aside class="grid_3" id="sidebar">
        <h2>微博 <span>Weibo</span></h2>
        <ul id="weibo_list">
			<?php foreach ($weibo_message as $v): ?>
            <li>
				<p>
				<?php echo $this->date->format($v['created_at']); ?> : 
				<?php echo mb_substr($v['text'],0,30,'utf-8'); ?> ...
				</p>
			</li>
            <?php endforeach; ?>
        </ul>

        <h2>友情链接 <span>Links</span></h2>
        <ul>
            <li><a href="#" title="ouyoyo">ouyoyo.com</a></li>
            <li><a href="#" title="ouyoyo">ouyoyo.com</a></li>
            <li><a href="#" title="ouyoyo">ouyoyo.com</a></li>
		</ul>
    </aside>
</section>

<?php echo $this->load->view('footer'); ?>
